﻿using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZhonTai.Industry.Contracts.Core.Enums;
using ZhonTai.Industry.Domain.WorkStation;

namespace ZhonTai.Industry.Services.PLCBlock.Dto.Output
{
    public class PLCBlockGetListOutput
    {
        public long Id { get; set; }

        /// <summary>
        /// 工站ID
        /// </summary>
        /// <remarks>工站ID</remarks>
        public long WorkStationId { get; set; }

        /// <summary>
        /// 工站代号
        /// </summary>
        public string StationCode { get; set; }

        /// <summary>
        /// 产线名称
        /// </summary>
        public string LineName { get; set; }

        /// <summary>
        /// 数据块名称
        /// </summary>
        /// <remarks>数据块名称</remarks>
        [Column(StringLength = 100)]
        public string BlockName { get; set; }

        /// <summary>
        /// 用途
        /// </summary>
        /// <remarks>用途</remarks>
        public DBPurposeEnum Purpose { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        /// <remarks>类型</remarks>
        [Column(StringLength = 20)]
        public DataBlockEnum BlockType { get; set; }

        /// <summary>
        /// 起始偏移量
        /// </summary>
        /// <remarks>起始偏移量</remarks>
        public int StartOffset { get; set; }

        /// <summary>
        /// 数据块大小
        /// </summary>
        /// <remarks>数据块大小</remarks>
        [Column(Precision = 64)]
        public ushort DataSize { get; set; }

        /// <summary>
        /// 数据块地址
        /// </summary>
        /// <remarks>数据块地址</remarks>
        [Column(StringLength = 64)]
        public int Address { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        /// <remarks>描述</remarks>
        [Column(StringLength = 64)]
        public string Description { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        /// <remarks>排序</remarks>
        public int Sort { get; set; }

        /// <summary>
        /// 启用
        /// </summary>
        /// <remarks>启用</remarks>
        public bool Enabled { get; set; }
    }
}